<template>
  <view>
    <swiper :autoplay="true" :circular="true" :indicatorDots="true" class="bnrbox" duration="1000"
            indicatorActiveColor="#fff" interval="3000">
      <swiper-item v-for="(item, index) in U.photolist" :key="index">
        <view>
          <image :class="'photo_b ' + blur" :data-cur="item" :src="item" mode="aspectFill" @tap="bannerFn"></image>
        </view>
      </swiper-item>
    </swiper>
    <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="uidbox">
      <view v-if="!globalUtils.empty(U.areatitle_map)" class="area">
        <text class="ico u-icon-map"></text>
        现居{{ U.areatitle_map }}
      </view>
      <view class="dt">
        <view class="h1">
          <text>{{ U.nickname }}</text>
          <image :src="U.grade_ico" class="ugrade2" mode="aspectFit"></image>
        </view>
        <view class="h5">{{ U.ageheighpay }}</view>
      </view>
      <view class="dd">
        <view class="photo_s">
          <view>
            <image :class="blur" :src="U.photo_s" mode="aspectFill"></image>
          </view>
          <text :data-uid="U.uid" @tap.stop.prevent="copyuidFn">ID:{{ U.uid }}</text>
        </view>
      </view>
      <text :class="'ico gz ' + U.gzclass" @tap="gzFn"></text>
      <image v-if="!globalUtils.empty(U.cert_sign_str)" :src="U.cert_sign_str" class="sign" mode="widthFix"></image>
    </view>
    <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';display: nonee;'" class="topbar">
      <text v-for="(item, index) in topbar" :key="index" :class="'item ' + (currentTab == index ? 'ed small_big' : '')"
            :data-idx="index" @tap="topbarFn">
        {{ item.title }}

        <text v-if="item.num > 0">({{ item.num }})</text>
      </text>
    </view>
    <swiper :circular="true" :current="currentTab" :style="'height:' + heights[currentTab] + 'px'"
            class="main"
            duration="200"
            @change="mainChange">
      <swiper-item>
        <view :style="color + ';--rgbcolor:' + rgbcolor" class="main1 mainHeight">
          <view v-if="U.RZnum > 0" class="u2data">
            <view class="dt">
              <text class="ico icon-rz"></text>
              <text class="tbody">身份认证</text>
              <view class="span" @tap="cert_moreFn">
                已点亮{{ U.RZnum }}项认证　更多
                <text class="ico icon-rightJ"></text>
              </view>
            </view>
            <view class="dd">
              <view class="u2cert2" @tap="cert_moreFn">
                <view v-for="(item, index) in U.RZ" :key="index" :class="'li2' + (item.ed == 1 ? ' ed' : '')">
                  <view v-if="item.F === 'health' ||item.F === 'credit' ">
                    <view v-if="item.ed == 1"
                          :class="['i','alyIcon-rzico_' + item.F,]"
                          :style="'background-image:-webkit-linear-gradient(left,' + item.bg + ');'">
                      <text class="ico span"></text>
                    </view>
                    <view v-else :class="['i','alyIcon-rzico_' + item.F,]">
                      <text class="ico span"></text>
                    </view>
                    <view class="h4">{{ item.title }}</view>
                  </view>
                  <view v-else>
                    <view v-if="item.ed == 1"
                          :class="'i ico rzico_' + item.F"
                          :style="'background-image:-webkit-linear-gradient(left,' + item.bg + ');'">
                      <text class="ico span"></text>
                    </view>
                    <view v-else :class="'i ico rzico_' + item.F">
                      <text class="ico span"></text>
                    </view>
                    <view class="h4">{{ item.title }}</view>
                  </view>
                </view>
              </view>
            </view>
          </view>
          <view class="u2data">
            <view class="dt">
              <text class="ico icon-jbzl"></text>
              <text class="tbody">基本资料</text>
            </view>
            <view class="dd">
              <block v-if="U.YKviewU_data == 1">
                <text v-for="(item, index) in U.basic" :key="index" class="li">{{ item }}</text>
                <text :style="'color:' + color + ';'" class="li" @tap="data_moreFn">查看更多</text>
              </block>
              <view v-else :style="'--rgbcolor:' + rgbcolor" class="btn4 ico YKviewU_data" @tap="loginFn">
                登录注册后可看个人资料
              </view>
            </view>
          </view>
          <view v-if="U.mate.length > 0" class="u2data">
            <view class="dt">
              <text class="ico icon-zoyq"></text>
              <text class="tbody">择偶要求</text>
            </view>
            <view class="dd">
              <block v-if="U.YKviewU_data == 1">
                <text v-for="(item, index) in U.mate" :key="index" class="li">{{ item }}</text>
              </block>
              <view v-else :style="'--rgbcolor:' + rgbcolor" class="btn4 ico YKviewU_data" @tap="loginFn">
                登录注册后可看择偶要求
              </view>
            </view>
          </view>
          <view v-if="U.aboutus">
            <view v-if="U.aboutus.length > 0" class="u2data">
              <view class="dt">
                <text class="ico icon-aboutus"></text>
                <text class="tbody">自我介绍</text>
              </view>
              <view class="dd">
                <text v-if="U.YKviewU_data == 1" class="aboutus2">{{ U.aboutus }}</text>
                <view v-else :style="'--rgbcolor:' + rgbcolor" class="btn4 ico YKviewU_data" @tap="loginFn">
                  登录注册后可看自我介绍
                </view>
              </view>
            </view>
          </view>
          <view v-if="UBBS.flag == 1" class="u2data pjbox">
            <view class="dt">
              <text class="ico"></text>
              <text class="tbody">评价此人</text>
              <view v-if="UBBS.list.length > 0" :style="'color:' + color" class="span" @tap="ubbsbtnFn">
                我要评价
                <text class="ico icon-rightJ"></text>
              </view>
            </view>
            <view class="dd">
              <view class="ubbsu">
                <block v-if="UBBS.list.length > 0">
                  <view v-for="(item, index) in UBBS.list" :key="index" class="em">
                    <view class="span">
                      <image :src="item.photo_s" mode="aspectFill"></image>
                    </view>

                    <view class="font">
                      <text class="i ico"> 评价于{{ item.addtime }}</text>
                      <view>{{ item.content }}</view>
                    </view>
                  </view>
                </block>
                <view v-else class="nobbs">
                  <view class="span">暂无评价</view>
                  <text
                      :style="'background:-webkit-linear-gradient(315deg,rgba(' + rgbcolor + ',.6) 0%,' + color + ' 100%);background-color:#fff;'"
                      class="btn3"
                      @tap="ubbsbtnFn"
                  >
                    我要评价
                  </text>
                </view>
              </view>
            </view>
          </view>
          <view v-if="U.guessyou">
            <view v-if="U.guessyou.length > 0" class="guessyou">
              <view class="tj">
                <text class="b">猜你喜欢</text>
                <text :style="'color:' + color" class="a" @tap="zoyqFn">
                  设置要求
                  <text class="ico icon-setzoyq"></text>
                </text>
              </view>
              <view v-for="(item, index) in U.guessyou" :key="index" :data-uid="item.uid" class="li"
                    @tap="guessyouFn">
                <view class="a">
                  <image :src="item.photo_s" mode="aspectFill"></image>
                  <text class="h5">{{ item.nickname }}</text>
                  <text class="font">{{ item.age }}</text>
                </view>
              </view>
            </view>
          </view>
          <view class="vip2" @tap="vipFn">
            <view class="vippic">
              <image :class="blur" :src="U.photo_s" mode="aspectFill"></image>
            </view>
            <view class="viptitle">开通会员・飞速脱单</view>
            <view class="vipc">相亲成功率提升300%</view>
            <view class="vipbtn">
              <text class="ico icon-vipk"></text>
              升级VIP
            </view>
          </view>
          <view class="hmd">
            <view class="jubao" @tap="jubaoFn">
              <text class="ico"></text>
              举报此人
            </view>
            <view class="lahei" @tap="laheiFn">
              <text class="ico"></text>
              {{ U.ifhmd == 1 ? '取消拉黑' : '将TA拉黑' }}
            </view>
          </view>
        </view>
      </swiper-item>
      <swiper-item>
        <view class="trend mainHeight" style="min-height: 200rpx">
          <view v-for="(item, trend_idx2) in TREND" :key="trend_idx2"
                :style="'--color:' + color + ';--rgbcolor:' + rgbcolor"
                class="dl">
            <view class="dd">
              <view class="h1">{{ item.C.C }}</view>
              <view v-if="item.C.kind == 'pic'" class="h1">
                <image :src="item.C.path_b" class="alpha0_100_1s" mode="widthFix"></image>
              </view>
              <view v-if="item.pic_arr.length > 0" :class="item.pic_arr.length <= 1 ? 'h1' : 'p'">
                <image
                    v-for="(item3, index) in item.pic_arr"
                    :key="index"
                    :data-cur="item3"
                    :data-idx2="trend_idx2"
                    :src="item3"
                    class="alpha0_100_1s"
                    mode="widthFix"
                    @tap="zoom9Fn"
                ></image>
              </view>
            </view>

            <view class="agree">
              <text class="time">{{ item.addtime }}</text>
              <view :class="'i ' + item.agree_class" :data-id="item.id" :data-idx2="trend_idx2" @tap="agreeFn">
                <text class="font ico S16"></text>
                <text class="font">
                  <text :style="'display:' + item.agreefly + ';'" class="b agreefly">+1</text>
                  <text class="span">{{ item.agree_arr.length > 0 ? item.agree_arr.length : '' }}</text>
                  　
                </text>
              </view>
              <view :class="'i ' + item.bbs_class" :data-id="item.id" :data-idx2="trend_idx2" @tap="bbsFn">
                <text class="font ico S16"></text>
                <text class="font">
                  <text class="span">{{ item.bbs_arr.length > 0 ? item.bbs_arr.length : '' }}</text>
                </text>
              </view>
            </view>

            <view class="j"></view>

            <view v-if="item.agree_arr.length > 0" class="em">
              <image v-for="(item2, index) in item.agree_arr" :key="index" :data-uid="item2.uid"
                     :src="item2.photo_s" mode="aspectFill"></image>
            </view>

            <view v-if="item.bbs_arr.length > 0" class="ul">
              <view v-for="(item3, index) in item.bbs_arr" :key="index" class="li">
                <image :data-uid="item3.uid" :src="item3.photo_s" class="m" mode="aspectFill" @tap="bind_dl"></image>

                <view class="h5">
                  {{ item3.nickname }}：
                  <text class="font">{{ item3.addtime }}</text>
                </view>

                <view class="span">
                  <text :class="'font' + (item3.c == '审核中' ? ' C999' : '')">{{ item3.c }}</text>
                </view>
              </view>
            </view>
          </view>
          <view v-if="TREND.length == 0" class="nodata" style="margin-top: 0">
            <image mode="aspectFit" src="/static/res/img/nodata.png"></image>
            暂无动态
          </view>
        </view>
      </swiper-item>
      <swiper-item>
        <view class="uPlist2 mainHeight" style="min-height: 700rpx">
          <image v-for="(item, index) in PHOTO" :key="index" :class="'photo ' + blur" :data-cur="item" :src="item"
                 mode="aspectFill" @tap="photo2Fn"></image>
          <view v-if="PHOTO.length == 0" class="nodata" style="margin-top: 0">
            <image mode="aspectFit" src="/static/res/img/nodata.png"></image>
            暂无相册
          </view>
        </view>
      </swiper-item>
    </swiper>
    <view v-if="div_bbs" class="mask2 alpha0_100">
      <view class="div_box big_normal div_bbs" style="--div_box_width: 82%; --div_box_height: 480rpx">
        <view class="close ico" @tap="kefu_closeFn"></view>
        <view class="div_title">评价Ta</view>
        <form @submit="div_bbs_submitFn">
                    <textarea
                        class="textarea"
                        name="content"
                        placeholder="为了对您和他人负责请如实描述对此人印象或三观等...评价只有一次机会请认真对待~~"
                        placeholderClass="placeholder"
                    ></textarea>
          <button :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';'" class="btn4 ico" formType="submit">
            提交评价
          </button>
        </form>
      </view>
    </view>
    <page-container
        :closeOnSlideDown="false"
        :overlay="true"
        :round="true"
        :show="bbsFormFlag"
        customStyle="height:35%"
        duration="300"
        position="top"
        zIndex="222"
        @clickoverlay="bbsFormMaskFn"
    >
      <form :data-id="bbs_form_id" :data-idx2="bbs_form_idx2" @submit="bbs_submitFn">
        <view class="bbs_form_box">
          <view class="S16 B">{{ Farr.title }}</view>
          <textarea :focus="bbs_content_focus" :value="bbs_content" name="bbs_content"
                    placeholder="请文明发言~"></textarea>
        </view>
        <button :style="'width:80%;--color:' + color + ';--rgbcolor:' + rgbcolor" class="btn5" formType="submit"
                type="button">提交评论
        </button>
      </form>
    </page-container>
    <view class="btmbox">
      <button class="ico" openType="share" style="width: 92rpx"></button>
      <view
          v-if="U.ifcontact_hh || U.ifchat"
          :style="'background:-webkit-linear-gradient(315deg,rgba(' + rgbcolor + ',.7) 0%,' + color + ' 100%);background-color: #fff;'"
          @tap="contactFn"
      >
        <text :style="'font-size:46rpx;color:' + color" class="ico"></text>
        <text>联系Ta</text>
      </view>
      <view v-if="U.ifhn"
            style="background: -webkit-linear-gradient(315deg, rgba(250, 74, 45, 0.7) 0%, #fa4a2d 100%); background-color: #fff"
            @tap="div_hn_btmFn">
        <text class="ico" style="color: #fa4a2d"></text>
        <text>经纪人牵线</text>
      </view>
    </view>
    <view v-if="U.ifxqk == 1" class="tgxqk" @tap="xqkFn">
      <view class="ico"></view>
      <text>相亲卡</text>
    </view>
    <view v-if="GIFT.flag == 1" class="tgxqk gift huang_delay" @tap="giftFn">
      <view class="ico"></view>
      <text>送礼物</text>
    </view>
    <view class="blank"></view>
    <!-- parse <include src="../login.wxml"></include> -->
    <block>
      <view v-if="div_login" class="mask3 alpha0_100">
        <view
            class="div_box big_normal"
            style="--div_box_width: 82%; --div_box_height: 666rpx; background: -webkit-linear-gradient(top, #fde9ee 1%, #fff 150%); background-color: #fff"
        >
          <view :style="'border-color:rgba(' + rgbcolor + ',.2);'" class="m">
            <image mode="aspectFit" src="/static/res/img/photo_m.png"></image>
          </view>
          <view class="S22 B">登录后获得更精准推荐</view>
          <view class="loginagree">
            <checkbox-group @change="ifagreeFn">
              <label style="margin-left: -10rpx">
                <checkbox :style="'--color:' + color + ';'" value="1"></checkbox>
                <text class="C666 vmiddle">阅读并同意</text>
              </label>
            </checkbox-group>
            <navigator :style="'color:' + color" class="vmiddle" hoverClass="none"
                       url="/pagesA/about/law?kind=agreement">用户协议
            </navigator>
            <text class="C666 vmiddle">与</text>
            <navigator :style="'color:' + color + ';'" class="vmiddle" hoverClass="none"
                       url="/pagesA/about/law?kind=declara">隐私条款
            </navigator>
          </view>
          <button
              v-if="ifagree"
              :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';width:73%'"
              class="btn5 W90_"
              openType="getPhoneNumber"
              @getphonenumber="getPhoneNumber"
          >
            <text>手机号快捷登录</text>
            <text :style="'color: ' + color + ';'">私密</text>
          </button>
          <button v-else :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';width:73%'"
                  class="btn5" @tap="ifagree_passFn">
            <text>手机号快捷登录</text>
            <text :style="'color: ' + color + ';'">私密</text>
          </button>
          <view class="C666" @tap="back">
            <text style="border-bottom: #999 1px solid">暂不登录</text>
          </view>
        </view>
      </view>
    </block>
    <!-- parse <include src="../component/div_hn_btm.wxml"></include> -->
    <block>
      <view v-if="div_hn_btm" :class="'mask1 ' + mask_class" @tap="div_hn_btm_closeFn">
        <view
            :class="'div_bottom div_bottom_yuan ' + div_hn_btm_box_class"
            :style="'--div_box_height:' + (HN.homekefuewm == 1 ? 500 : 740) + 'rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
            @tap.stop.prevent="emptyFn"
        >
          <view class="closert ico" @tap.stop.prevent="div_hn_btm_closeFn"></view>
          <view class="div_hn_btm">
            <block v-if="!globalUtils.empty(HN.hn_id) && HN.homekefuewm == 0">
              <view class="dl">
                <view class="dt">
                  <view class="senduid">
                    <image :src="HN.cook_photo_m_url" mode="aspectFill"></image>
                    <text class="font">
                      我
                      <text class="span">ID：{{ HN.cook_uid }}</text>
                    </text>
                  </view>
                  <view class="admid">
                    <view class="em hnpic">
                      <image :src="HN.hn_path_s_url" mode="aspectFill"></image>
                      <text class="b">经纪人</text>
                    </view>
                    <text class="font">{{ HN.hn_truename }}</text>
                  </view>
                  <view class="uid">
                    <image :src="HN.photo_m_url" mode="aspectFill"></image>
                    <text class="font">
                      <text class="span">ID：{{ HN.uid }}</text>
                    </text>
                  </view>
                </view>
                <view class="dd">
                  <image :showMenuByLongpress="true" :src="HN.hn_ewm_url" mode="aspectFill"></image>
                  <view class="C999 h6">长按二维码加经纪人微信</view>
                  <navigator hoverClass="none" url="/myPages/hongniang/hongniang?currentTab=1">我的牵线记录({{
                      HN.cook_qxnum_ed
                    }})
                  </navigator>
                </view>
              </view>
              <view :style="HN.cook_qxnum_ed_herme > 0 ? 'background:#f60' : ''" class="btn5 ico"
                    @tap="div_hn_btm_qxFn">{{ HN.qxbtn_str }}
              </view>
            </block>
            <view v-if="globalUtils.empty(HN.hn_id) || HN.homekefuewm == 1" class="homekefuewm">
              <image :showMenuByLongpress="true" :src="HN.kf_ewm_url" mode="aspectFill"></image>
              <view class="font">长按二维码加客服微信</view>
              <view class="em" @tap="telFn">
                <text class="i ico"></text>
                <view class="a">{{ HN.kf_tel }} (点击拔打)</view>
              </view>
            </view>
          </view>
        </view>
      </view>
    </block>
    <!-- parse <include src="../component/div_gift_btm.wxml"></include> -->
    <block>
      <view v-if="div_gift_btm" :class="'mask1 ' + mask_class" @tap="div_gift_btm_closeFn">
        <view
            :class="'div_bottom div_bottom_yuan ' + div_gift_btm_box_class"
            :style="'--div_box_height:777rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
            @tap.stop.prevent="emptyFn"
        >
          <view class="closert ico" @tap.stop.prevent="div_gift_btm_closeFn"></view>
          <view class="div_gift_btm">
            <view class="btn4 ico" @tap.stop.prevent="gifrandFn">换一组 </view>
            <view class="tips">
              缘分，从送第一份礼物开始认识！
              <text class="more ico" @tap.stop.prevent="giftmoreFn">更多礼物</text>
            </view>
            <view class="giflist">
              <view v-for="(itemli, index) in GIFT.LIST" :key="index" class="li">
                <view :data-id="itemli.id" @tap.stop.prevent="giftwinFn">
                  <image :src="itemli.picurl" mode="aspectFill"></image>
                  <view class="h4">{{ itemli.title }}</view>
                  <view class="h5">
                    <text class="i ico"></text>
                    {{ itemli.price }}
                  </view>
                </view>
              </view>
            </view>
          </view>
        </view>
      </view>
      <view v-if="div_gift_win" class="mask2 alpha0_100">
        <view class="div_box div_gift_win big_normal" style="--div_box_width: 560rpx; --div_box_height: 560rpx">
          <view class="close ico" @tap="kefu_closeFn"></view>
          <view class="div_title">送礼物给【{{ U.nickname }}】</view>
          <view class="div_gift_win_box">
            <view class="em">
              <image :src="GIFTONE.picurl" class="loop_s_b_s" mode="aspectFill"></image>
              <view class="h3">{{ GIFTONE.title }}</view>
              <view class="h6">{{ GIFTONE.price }}{{ GIFT.dw }}</view>
            </view>
            <view class="a" @tap="kefu_closeFn">我再想想</view>
            <view class="a" @tap="gift_sendFn">立即赠送</view>
          </view>
        </view>
      </view>
      <view v-if="tips0_100_0" class="tips0_100_0 alpha0_100_0">
        <view class="i ico hi"></view>
        礼物已送出
      </view>
      <view v-if="div_noloveb" :class="'mask3 ' + mask_class" data-maskid="div_noloveb" @tap="mask_closeFn">
        <view
            :style="'--div_box_width:600rpx;--div_box_height:580rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
            class="div_box div_data small_big"
            @tap.stop.prevent="emptyFn"
        >
          <view class="closebtm ico" data-maskid="div_noloveb" @tap.stop.prevent="mask_closeFn"></view>
          <view class="h1">{{ div_data_title }}</view>
          <rich-text :nodes="div_data_content" class="C S15" style="margin-top: 40rpx"></rich-text>
          <view class="C S15" style="margin-top: 40rpx">请点击下方按钮购买</view>
          <view class="C S15">购买后请重新发起送礼</view>
          <view class="ico picico"></view>
          <view class="btn_btm cols2">
            <navigator class="btn4 ico" url="/myPages/loveb/loveb?currentTab=2">在线支付</navigator>
            <navigator class="btn4 ico" url="/myPages/hongniang/hongniang">找经纪人购买</navigator>
          </view>
        </view>
      </view>
    </block>
    <view v-if="contact_show" :class="'mask3 ' + contact_class" @tap="contact_closeFn">
      <view class="contact">
        <view v-if="U.ifchat" class="a chat" @tap.stop.prevent="chatFn">
          <text class="i ico"></text>
          <view class="span">在线聊天</view>
        </view>
        <view v-if="U.ifcontact_hh && U.hh_ifweixin == 1" class="a hh_wx" data-kind="weixin" @tap.stop.prevent="hhFn">
          <text class="i ico"></text>
          <view class="span">互换微信</view>
        </view>
        <view v-if="U.ifcontact_hh && U.hh_ifmob == 1" class="a hh_mob" data-kind="mob" @tap.stop.prevent="hhFn">
          <text class="i ico"></text>
          <view class="span">互换手机</view>
        </view>
      </view>
    </view>
    <block v-if="U.ifcontact_hh">
      <view v-if="no_hh_num" :class="'mask3 ' + mask_class" data-maskid="no_hh_num" @tap="mask_closeFn">
        <view :style="'--div_box_width:600rpx;--div_box_height:' + (HH.cook_hh_num_ed > 0 ? '566' : '466') + 'rpx;'"
              class="div_box"
              @tap.stop.prevent="emptyFn">
          <view class="closebtm ico" data-maskid="no_hh_num" @tap.stop.prevent="mask_closeFn"></view>
          <view class="h1">升级会员・沟通无极限</view>
          <view class="C S15">
            <view style="margin-bottom: 20rpx">您当前没有互换次数或已用完</view>
            <view v-if="HH.cook_hh_num_ed > 0">
              您已互换了
              <text class="Cf00">{{ HH.cook_hh_num_ed }}</text>
              次，
              <text :style="'color:' + color + ';border-bottom:' + color + ' 1px solid'" @tap.stop.prevent="hhurlFn">
                查看互换记录
              </text>
            </view>
            <view :style="'margin-top:' + (HH.cook_hh_num_ed > 0 ? '60' : '0') + 'rpx'">升级更高等级获得更多次数和服务
            </view>
          </view>
          <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="btn_btm btn44 ico"
                @tap.stop.prevent="vipFn"> 立即升级
          </view>
        </view>
      </view>
      <view v-if="div_hh_box" :class="'mask3 ' + mask_class" data-maskid="div_hh_box" @tap="mask_closeFn">
        <view :style="'--div_box_width:600rpx;--div_box_height:580rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
              class="div_box div_hh_box"
              @tap.stop.prevent="emptyFn">
          <view class="closebtm ico" data-maskid="div_hh_box" @tap.stop.prevent="mask_closeFn"></view>
          <view class="ico picico"></view>
          <view class="h1">和{{ U.sex == 1 ? '他' : '她' }}互换{{ hh_title }}</view>
          <form :data-hh_kind="hh_kind" @submit="hh_submitFn">
            <view class="inputbox">
              <text :class="'i ico ' + (hh_kind == 'weixin' ? 'wxi' : 'mobi')">{{
                  hh_kind == 'weixin' ? '' : ''
                }}
              </text>
              <input
                  :placeholder="'请输入' + hh_title"
                  :value="hh_kind == 'weixin' ? HH.cook_weixin : HH.cook_mob"
                  confirmType="完成"
                  maxlength="30"
                  name="content"
                  type="text"
              />
            </view>
            <view class="em">
              对方同意后，双方可看，{{ hh_title }}必须真实有效，否则将纳入失信名单并进行
              <text class="Cf00">封号处理</text>
            </view>
            <view class="S15" style="margin-top: 30rpx">
              <text v-if="HH.cook_hh_num > 0">
                当前剩余
                <text class="Cf00">{{ HH.cook_hh_num }}</text>
                次
              </text>
              <text v-if="HH.cook_hh_num_ed > 0"
                    :style="'color:' + color + ';border-bottom:' + color + ' 1px solid;margin-left:40rpx'"
                    @tap="hhurlFn">
                {{ HH.cook_hh_num_ed }}次互换记录
              </text>
            </view>
            <button class="btn_btm btn44 ico" formType="submit"> 确认发送</button>
          </form>
        </view>
      </view>
      <view v-if="div_hh_success" :class="'mask3 ' + mask_class" data-maskid="div_hh_success" @tap="mask_closeFn">
        <view
            :style="'--div_box_width:600rpx;--div_box_height:430rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
            class="div_box div_hh_box small_big"
            @tap.stop.prevent="emptyFn"
        >
          <view class="closebtm ico" data-maskid="div_hh_success" @tap.stop.prevent="mask_closeFn"></view>
          <view class="ico picico"></view>
          <view class="h1 C090 ico"> 发送成功</view>
          <view class="C S15 ico" style="margin-top: 30rpx; text-align: left"> 请等待对方同意...</view>
          <view class="C S15" style="text-align: left">同意后您将收到对方的{{ hh_title }}</view>
          <view class="C S15" style="margin-top: 30rpx">
            可在【我的】
            <text class="ico"></text>
            【互换】查看进展
          </view>
        </view>
      </view>
    </block>
    <view v-if="div_vip" :class="'mask3 ' + mask_class" data-maskid="div_vip" @tap="mask_closeFn">
      <view class="div_box div_vip" style="--div_box_width: 600rpx; --div_box_height: 480rpx"
            @tap.stop.prevent="emptyFn">
        <view class="closebtm ico" data-maskid="div_vip" @tap.stop.prevent="mask_closeFn"></view>
        <view class="h1">{{ div_vip_title }}</view>
        <view class="C S15">开通VIP超级会员，专享超值权益</view>
        <view class="C S15">相亲成功率提升300%</view>
        <view class="ico picico"></view>
        <view class="btn_btm btn44 ico" @tap.stop.prevent="vipFn"> 立即升级</view>
      </view>
    </view>
    <view v-if="div_cert" :class="'mask3 ' + mask_class" data-closekind="back" data-maskid="div_cert"
          @tap="mask_closeFn">
      <view class="div_box div_cert" style="--div_box_width: 600rpx; --div_box_height: 480rpx"
            @tap.stop.prevent="emptyFn">
        <view class="closebtm ico" data-closekind="back" data-maskid="div_cert" @tap.stop.prevent="mask_closeFn">
        </view>
        <view class="h1">{{ div_cert_title }}</view>
        <view class="C S15">成为认证用户，即享沟通特权</view>
        <view class="C S15">提高诚信值，杜绝虚假</view>
        <view class="ico picico"></view>
        <view class="btn_btm btn44 ico" @tap.stop.prevent="certFn">立即认证</view>
      </view>
    </view>
    <view v-if="div_data" :class="'mask3 ' + mask_class" data-closekind="back" data-maskid="div_data"
          @tap="mask_closeFn">
      <view :style="'--div_box_width:600rpx;--div_box_height:480rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
            class="div_box div_data"
            @tap.stop.prevent="emptyFn">
        <view class="closebtm ico" data-closekind="back" data-maskid="div_data" @tap.stop.prevent="mask_closeFn">
        </view>
        <view class="h1">{{ div_data_title }}</view>
        <view class="C S15">赶快去完善，解锁更多功能</view>
        <view class="C S15">完成资料，上传头像，受关注度暴增</view>
        <view class="C S15 Cf00">如果还未审核，请等待审核</view>
        <view class="ico picico"></view>
        <view class="btn_btm btn44 ico" @tap.stop.prevent="dataFn">立即完善</view>
      </view>
    </view>
    <view v-if="hn_show" :class="'mask3 ' + hn_class" @tap="hn_closeFn">
      <view class="div_box" style="--div_box_width: 70%; --div_box_height: 666rpx">
        <view class="close ico" @tap="hn_closeFn"></view>
        <view class="truename">{{ HN.truename }}</view>
        <view class="id">工号：{{ HN.id }}</view>
        <view class="kf_wxpic">
          <image :showMenuByLongpress="true" :src="HN.ewm_url"></image>
        </view>
        <view class="kf_text">长按二维码添加客服微信</view>
        <view class="kf_text">咨询经纪人1对1人工服务</view>
      </view>
    </view>
    <privacy-popup @agree="privacy_agree" @disagree="privacy_disagree"></privacy-popup>
  </view>
</template>
<script>
import privacyPopup from '../../components/privacyPopup/privacyPopup.vue';
import globalUtils from "../../res/www.a9a.cn";

var t = require('../../@babel/runtime/helpers/defineProperty');
var a = require('../../res/www.a9a.cn.js');
var app = getApp();
var i = uni.getStorageSync('COOK_U');
export default {
  computed: {
    globalUtils() {
      return globalUtils
    }
  },
  components: {
    privacyPopup
  },
  data() {
    return {
      uid: '',
      singlePage: false,
      topbar: [
        {
          title: '资料',
          num: 0
        },
        {
          title: '动态',
          num: 0
        },
        {
          title: '相册',
          num: 0
        }
      ],
      currentTab: 0,
      color: '',
      rgbcolor: '',
      udata: {
        photo_s: '../../res/img/photo_m.jpg'
      },
      heights: [],
      div_login: false,
      mask_class: 'alpha0_100',
      U: {
        photolist: [],
        nickname: '',
        grade_ico: '',
        ageheighpay: '',
        photo_s: '',
        uid: '',
        gzclass: '',
        cert_sign_str: '',
        RZnum: 0,
        RZ: [],
        YKviewU_data: 0,
        basic: [],
        mate: [],
        aboutus: [],
        guessyou: [],
        ifcontact_hh: '',
        ifchat: '',
        ifhn: '',
        ifxqk: 0,
        hh_ifweixin: 0,
        hh_ifmob: 0,
        sex: 0
      },
      HN: {
        homekefuewm: 0,
        cook_photo_m_url: '',
        cook_uid: '',
        hn_path_s_url: '',
        hn_truename: '',
        photo_m_url: '',
        uid: '',
        hn_ewm_url: '',
        cook_qxnum_ed: '',
        cook_qxnum_ed_herme: 0,
        qxbtn_str: '',
        kf_ewm_url: '',
        kf_tel: '',
        truename: '',
        id: '',
        ewm_url: ''
      },
      UBBS: {
        flag: 0,
        list: []
      },

      MB: '',
      blur: '',

      GIFT: {
        flag: 0,
        LIST: [],
        dw: ''
      },
      TREND: '',
      num: '',
      PHOTO: '',
      ios_ifpay: '',
      bbsFormFlag: false,
      bbs_content: '',
      bbs_form_id: '',
      bbs_form_idx2: '',
      bbs_content_focus: false,
      div_bbs: false,
      div_gift_win: false,
      hn_show: false,
      hn_class: '',
      div_hn_btm: false,
      div_hn_btm_box_class: '',
      contact_show: false,
      contact_class: '',
      HH: {
        cook_hh_num_ed: 0,
        cook_weixin: '',
        cook_mob: '',
        cook_hh_num: 0
      },
      div_hh_box: false,
      hh_title: '',
      hh_kind: '',
      no_hh_num: false,
      div_hh_success: false,
      div_gift_btm: false,
      div_gift_btm_box_class: '',
      GIFTONE: {
        picurl: '',
        title: '',
        price: ''
      },
      tips0_100_0: false,
      ifagree: false,
      trend_idx2: 0,

      Farr: {
        title: ''
      },
      div_noloveb: '',
      div_data_title: '',
      div_data_content: '',
      div_vip: '',
      div_vip_title: '',
      div_cert: '',
      div_cert_title: '',
      div_data: ''
    };
  },
  onLoad: function (t) {
    if (a.ifint(t.uid)) {
      var i = t.uid;
    } else {
      var e = decodeURIComponent(t.scene);
      i = (e = e.split('='))[1];
    }
    this.setData({
      uid: i
    });
    if (1 !== t.share) {
      uni.showLoading({
        title: '玩命加载中...',
        mask: true
      });
    }
    var that = this;
    app.globalData.get_config('_ZEAI').then(function (t) {
      that.setData({
        color: app.globalData._ZEAI.color,
        rgbcolor: a.c16_rgb(app.globalData._ZEAI.color)
      });
    });
    app.globalData.get_navigationBarTopHeight(this);
    uni.getSystemInfo({
      success: function (t) {
        if ('singlePage' === t.mode) {
          that.setData({
            singlePage: true
          });
          that.init();
        } else {
          app.globalData.get_openid().then(function (t) {
            that.init();
          });
        }
      }
    });
  },
  onShareAppMessage: function (t) {
    var a = this.U.photolist[0];
    var n = ((a = this.U.photo_ifshow ? a : a.replace('_b.jpg', '_blur.jpg')), this.U);
    return {
      imageUrl: a,
      title: (1 == n.sex ? '【帅哥想脱单】' : '【美女想脱单】') + n.nickname + n.ageheighpay,
      path: '/pages/u/u?uid=' + this.uid
    };
  },
  onShareTimeline: function () {
    var t = this.U.photolist[0];
    var a = ((t = this.U.photo_ifshow ? t : t.replace('_b.jpg', '_blur.jpg')), this.U);
    return {
      imageUrl: t,
      title: (1 == a.sex ? '【帅哥想脱单】' : '【美女想脱单】') + a.nickname + a.ageheighpay,
      query: 'uid=' + this.uid + '&share=1',
      path: '/pagesA/u/u'
    };
  },
  methods: {
    topbarFn: function (t) {
      this.setData({
        currentTab: t.currentTarget.dataset.idx
      });
    },

    mainChange: function (t) {
      this.setData({
        currentTab: t.detail.current
      });
      this.mainHeight();
    },

    mainHeight() {
      var t = this, a = [];
      setTimeout(() => {
        uni.createSelectorQuery().selectAll(".mainHeight").boundingClientRect((function (n) {
          n.forEach((function (t, n) {
            if (n === 0 && t.height <= 360) {
              a[n] = 1000
            } else {
              a[n] = t.height + 20
            }
          })), t.setData({heights: a})
        })).exec()
      }, 300) // 适当延迟确保渲染完成
    },

    init: function () {
      var that = this;
      i = uni.getStorageSync('COOK_U');
      app.globalData.ajax({
        url: 'u.php',
        data: {
          submitok: 'U',
          uid: that.uid,
          openid: i.openid
        },
        success: function (n) {
          if (1 == n.flag) {
            var i;
            n.U.nickname;
            var o = 1 == n.U.photo_ifshow ? '' : 'blur';
            that.setData({
              U: n.U,
              HN: n.HN,
              UBBS: n.UBBS,
              MB: n.MB,
              blur: o,
              GIFT: n.GIFT,
              div_login: false,
              TREND: n.TREND,
              'topbar[1].num': n.TREND.length,
              PHOTO: n.PHOTO,
              'topbar[2].num': n.PHOTO.length,
              ios_ifpay: n.ios_ifpay
            });
            uni.setNavigationBarTitle({
              title: n.U.nickname
            });
          } else {
            n.msg;
            n.this = that;
            a.sorry(n);
          }
          that.mainHeight();
          uni.hideLoading();
        }
      });
    },

    back: function () {
      1 == this.pages.length
          ? uni.exitMiniProgram({
            success: function (t) {
            }
          })
          : uni.navigateBack();
    },

    bbsFn: function (t) {
      var that = this;
      var n = t.currentTarget.dataset.idx2;
      var i = t.currentTarget.dataset.id;
      this.setData({
        bbsFormFlag: true,
        bbs_content: '',
        bbs_form_id: i,
        bbs_form_idx2: n
      });
      setTimeout(function () {
        that.setData({
          bbs_content_focus: true
        });
      }, 500);
    },

    bbsFormMaskFn: function () {
      this.setData({
        bbsFormFlag: false,
        bbs_content_focus: false
      });
    },

    bbs_submitFn: function (e) {
      var that = this;
      app.globalData.chklogin().then(function (s) {
        s
            ? uni.showModal({
              title: '温馨提醒',
              content: '确定提交么？\n以下情形话题将被删除或封号：\n1．请勿留下任何形式联系方法\n2．请勿发表涉黄涉政相关言论\n3．请勿发表辱骂攻击他人言论',
              confirmColor: that.color,
              cancelText: '取消',
              confirmText: '确定',
              success: function (s) {
                if (s.confirm) {
                  var c = e.currentTarget.dataset.idx2;
                  var r = e.currentTarget.dataset.id;
                  var u = e.detail.value.bbs_content;
                  i = uni.getStorageSync('COOK_U');
                  app.globalData.ajax({
                    url: 'trend.php',
                    data: {
                      submitok: 'bbs_add',
                      fid: r,
                      content: u,
                      openid: i.openid
                    },
                    success: function (n) {
                      if (1 == n.flag) {
                        var i;
                        var e = that.TREND[c].bbs_arr.length;
                        that.setData(
                            (t((i = {}), 'TREND[' + c + '].bbs_class', n.ARR.bbs_class),
                                t(i, 'TREND[' + c + '].bbs_arr[' + e + ']', n.ARR.bbs_arr),
                                t(i, 'bbsFormFlag', false),
                                t(i, 'bbs_content_focus', false),
                                i)
                        );
                      } else {
                        n.this = that;
                        n.url = 'no';
                        a.sorry(n);
                      }
                    }
                  });
                }
              }
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    agreeFn: function (e) {
      var that = this;
      var s = e.currentTarget.dataset.idx2;
      var c = e.currentTarget.dataset.id;
      app.globalData.chklogin().then(function (e) {
        e
            ? ((i = uni.getStorageSync('COOK_U')),
                app.globalData.ajax({
                  url: 'trend.php',
                  data: {
                    submitok: 'ajax_agree',
                    tid: c,
                    openid: i.openid
                  },
                  success: function (n) {
                    if (1 == n.flag) {
                      var i;
                      var e = that.TREND[s].agree_arr.length;
                      that.setData(
                          (t((i = {}), 'TREND[' + s + '].agreefly', 'block'),
                              t(i, 'TREND[' + s + '].agree_arr[' + e + ']', {
                                uid: n.uid,
                                photo_s: n.photo_s
                              }),
                              i)
                      );
                    } else {
                      n.this = that;
                      n.url = 'no';
                      a.sorry(n);
                    }
                  }
                }))
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    vipFn: function () {
      app.globalData.chklogin().then(function (t) {
        t
            ? uni.navigateTo({
              url: '/pagesA/my_vip/my_vip'
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },
    certFn: function () {
      app.globalData.chklogin().then(function (t) {
        t
            ? uni.navigateTo({
              url: '/myPages/cert/cert'
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    dataFn: function () {
      app.globalData.chklogin().then(function (t) {
        t
            ? uni.navigateTo({
              url: '/pagesA/reg/reg'
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    copyuidFn: function (t) {
      var n = t.currentTarget.dataset.uid;
      a.copy_text({
        data: n,
        msg: 'ID编号复制成功'
      });
    },

    bannerFn: function (t) {
      if (!a.empty(this.U.photo_ifshow)) {
        var n = t.currentTarget.dataset.cur;
        a.empty(n) ||
        uni.previewImage({
          current: n,
          urls: this.U.photolist
        });
      }
    },

    photo2Fn: function (t) {
      if (!a.empty(this.U.photo_ifshow)) {
        var n = t.currentTarget.dataset.cur;
        a.empty(n) ||
        uni.previewImage({
          current: n,
          urls: this.PHOTO
        });
      }
    },

    getPhoneNumber: function (t) {
      app.globalData.getPhoneNumber({
        e: t,
        url: '/pagesA/reg/reg',
        urlkind: 'navigateTo'
      });
    },

    guessyouFn: function (t) {
      var a = t.currentTarget.dataset.uid;
      uni.redirectTo({
        url: 'u?uid=' + a
      });
    },

    zoyqFn: function () {
      app.globalData.chklogin().then(function (t) {
        t
            ? uni.navigateTo({
              url: '/pagesA/reg/reg?currentTab=2'
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    ubbsbtnFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (a) {
        a
            ? that.setData({
              div_bbs: true
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    div_bbs_submitFn: function (t) {
      var that = this;
      var o = t.detail.value;
      app.globalData.empty(o.content)
          ? uni.showToast({
            title: '请输入评论内容',
            icon: 'none',
            mask: true
          })
          : uni.showModal({
            title: '',
            content: '确定提交么？\r\n以下情形话题将被删除或封号：\r\n《请勿留下任何形式联系方法》\r\n《请勿发表涉黄涉政言论》\r\n《不得辱骂或攻击他人》',
            confirmColor: that.color,
            cancelText: '取消',
            confirmText: '确定',
            success: function (t) {
              if (t.confirm) {
                uni.showLoading({
                  title: '正在保存',
                  mask: true
                });
                app.globalData.ajax({
                  url: 'u.php',
                  data: {
                    submitok: 'bj_add',
                    openid: i.openid,
                    uid: that.uid,
                    content: o.content
                  },
                  success: function (t) {
                    uni.hideLoading();
                    1 == t.flag
                        ? uni.showModal({
                          content: t.msg,
                          confirmColor: that.color,
                          confirmText: '朕知道了',
                          showCancel: false,
                          success: function (t) {
                            that.setData({
                              div_bbs: false
                            });
                            that.init();
                          }
                        })
                        : ((t.this = that), (t.url = 'no'), a.sorry(t));
                  }
                });
              }
            }
          });
    },

    kefu_closeFn: function () {
      this.setData({
        div_bbs: false,
        div_gift_win: false
      });
    },

    zoom9Fn: function (t) {
      var n = t.currentTarget.dataset.cur;
      var i = t.currentTarget.dataset.idx2;
      a.empty(n) ||
      uni.previewImage({
        current: n,
        urls: this.TREND[i].pic_arr
      });
    },

    gzFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (o) {
        o
            ? ((i = uni.getStorageSync('COOK_U')),
                app.globalData.ajax({
                  url: 'u.php',
                  data: {
                    submitok: 'ajax_gz',
                    uid: that.uid,
                    openid: i.openid
                  },
                  success: function (n) {
                    1 == n.flag
                        ? (that.setData(t({}, 'U.gzclass', n.gzclass)),
                            uni.showToast({
                              title: n.msg,
                              icon: 'none',
                              mask: true
                            }))
                        : ((n.this = that), (n.url = 'no'), a.sorry(n));
                  }
                }))
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    cert_moreFn: function () {
      uni.navigateTo({
        url: '/pagesA/u/cert_more?uid=' + this.uid
      });
    },

    data_moreFn: function () {
      uni.navigateTo({
        url: '/pagesA/u/data_more?uid=' + this.uid
      });
    },

    hnFn: function () {
      var that = this;
      this.setData({
        hn_show: true,
        hn_class: 'alpha0_100'
      });
      app.globalData.ajax({
        url: 'u.php',
        data: {
          submitok: 'hn',
          uid: that.uid,
          openid: i.openid
        },
        success: function (a) {
          1 == a.flag
              ? that.setData({
                HN: a.HN
              })
              : uni.showToast({
                title: a.msg,
                icon: 'none',
                mask: true
              });
        }
      });
    },

    hn_closeFn: function () {
      var that = this;
      this.setData({
        hn_class: 'alpha100_0'
      });
      setTimeout(function () {
        that.setData({
          hn_show: false
        });
      }, 500);
    },

    div_hn_btmFn: function () {
      if (this.singlePage) {
        uni.showModal({
          content: '请点击右下角《前往小程序》',
          confirmText: '朕知道了',
          showCancel: false,
          success: function (t) {
          }
        });
      } else {
        var that = this;
        app.globalData.chklogin().then(function (a) {
          a
              ? that.setData({
                div_hn_btm: true,
                div_hn_btm_box_class: 'div_upAnm1'
              })
              : uni.navigateTo({
                url: '/pages/login/login'
              });
        });
      }
    },

    div_hn_btm_qxFn: function () {
      var that = this;
      var e = this.HN.qx_1price_str;
      e = app.globalData.empty(e) ? '' : '\r\n' + e;
      uni.showModal({
        title: '',
        content: '确定委托【' + that.HN.hn_truename + '】牵线么？' + e,
        confirmColor: that.color,
        cancelText: '我再想想',
        confirmText: '确定',
        success: function (e) {
          if (e.confirm) {
            app.globalData.ajax({
              url: 'huxuan.php',
              data: {
                submitok: 'div_hn_btm_qx',
                openid: i.openid,
                uid: that.uid,
                admid: that.HN.hn_id
              },
              success: function (i) {
                1 == i.flag
                    ? uni.showModal({
                      content: i.msg,
                      confirmColor: that.color,
                      confirmText: '朕知道了',
                      showCancel: false,
                      success: function (t) {
                        uni.navigateBack();
                      }
                    })
                    : 'qx_1price' == i.flag
                        ? 1 != that.ios_ifpay.flag
                            ? uni.getSystemInfo({
                              success: function (i) {
                                'ios' == i.platform
                                    ? uni.showModal({
                                      title: '温馨提示',
                                      content: that.ios_ifpay.tips,
                                      confirmColor: that.color,
                                      cancelText: '返回',
                                      confirmText: '联系经纪人',
                                      success: function (t) {
                                        t.confirm
                                            ? uni.redirectTo({
                                              url: '/myPages/hongniang/hongniang'
                                            })
                                            : t.cancel && uni.navigateBack();
                                      }
                                    })
                                    : app.globalData.pay({
                                      data: {
                                        submitok: 'qx_1price',
                                        qx_admid: that.HN.hn_id,
                                        qx_uid: that.uid
                                      },
                                      success: function (a) {
                                        uni.showToast({
                                          title: a.msg,
                                          mask: true,
                                          duration: 3000
                                        });
                                        setTimeout(function () {
                                          that.init();
                                        }, 3000);
                                      },
                                      fail: function (n) {
                                        n.this = that;
                                        n.url = 'no';
                                        a.sorry(n);
                                      }
                                    });
                              }
                            })
                            : app.globalData.pay({
                              data: {
                                submitok: 'qx_1price',
                                qx_admid: that.HN.hn_id,
                                qx_uid: that.uid
                              },
                              success: function (a) {
                                uni.showToast({
                                  title: a.msg,
                                  mask: true,
                                  duration: 3000
                                });
                                setTimeout(function () {
                                  that.init();
                                }, 3000);
                              },
                              fail: function (n) {
                                n.this = that;
                                n.url = 'no';
                                a.sorry(n);
                              }
                            })
                        : 0 == i.flag
                            ? uni.showModal({
                              content: i.msg,
                              confirmColor: that.color,
                              confirmText: '朕知道了',
                              showCancel: false,
                              success: function (t) {
                              }
                            })
                            : ((i.this = that), (i.url = 'no'), a.sorry(i));
              }
            });
          }
        }
      });
    },

    div_hn_btm_closeFn: function () {
      var that = this;
      this.setData({
        mask_class: 'alpha100_0',
        div_hn_btm_box_class: 'div_upAnm2'
      });
      setTimeout(function () {
        that.setData({
          div_hn_btm: false,
          mask_class: 'alpha0_100',
          div_hn_btm_box_class: 'div_upAnm1'
        });
      }, 500);
    },

    telFn: function (t) {
      uni.makePhoneCall({
        phoneNumber: this.HN.kf_tel
      });
    },

    contactFn: function () {
      var that = this;
      this.singlePage
          ? uni.showModal({
            content: '请点击右下角《前往小程序》',
            confirmText: '朕知道了',
            showCancel: false,
            success: function (t) {
            }
          })
          : (a.empty(this.MB) || app.globalData.openSetting(this.MB),
              app.globalData.chklogin().then(function (a) {
                // 修改多种联系方式交换
                a
                    ?
                    that.chatFn()
                    // that.setData({
                    //   contact_show: true,
                    //   contact_class: 'alpha0_100'
                    // })
                    : uni.navigateTo({
                      url: '/pages/login/login'
                    });
              }));
    },

    contact_closeFn: function () {
      var that = this;
      this.setData({
        contact_class: 'alpha100_0'
      });
      setTimeout(function () {
        that.setData({
          contact_show: false
        });
      }, 500);
    },

    chatFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (a) {
        a
            ? uni.navigateTo({
              url: '/pagesA/chat/chat?uid=' + that.uid
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
      this.contact_closeFn();
    },

    loginFn: function () {
      uni.navigateTo({
        url: '/pages/login/login'
      });
    },

    hhFn: function (t) {
      var e = t.currentTarget.dataset.kind;
      var o = 'weixin' == e ? '微信号' : '手机号';
      var that = this;
      app.globalData.ajax({
        url: 'u.php',
        data: {
          submitok: 'ajax_hh_chk',
          kind: e,
          uid: that.uid,
          openid: i.openid
        },
        success: function (t) {
          if (1 == t.flag)
            that.setData({
              HH: t.HH,
              mask_class: 'alpha0_100',
              div_hh_box: true,
              hh_title: o,
              hh_kind: e
            });
          else if ('no_hh_num' == t.flag) {
            that.setData({
              mask_class: 'alpha0_100',
              no_hh_num: true,
              HH: t.HH
            });
          } else {
            t.msg;
            t.this = that;
            a.sorry(t);
          }
        }
      });
      this.contact_closeFn();
    },

    hh_submitFn: function (t) {
      var e = t.currentTarget.dataset.hh_kind;
      var o = t.detail.value.content;
      var s = 'weixin' == e ? '微信号' : '手机号';
      var that = this;
      a.empty(o)
          ? uni.showToast({
            title: '请输入【' + s + '】',
            icon: 'none',
            mask: true
          })
          : 'mob' != e || a.ifmob(o)
              ? (this.setData({
                div_hh_box: false,
                hh_title: s
              }),
                  app.globalData.ajax({
                    url: 'u.php',
                    data: {
                      submitok: 'ajax_hh_update',
                      content: o,
                      hh_kind: e,
                      uid: that.uid,
                      openid: i.openid
                    },
                    success: function (t) {
                      1 == t.flag
                          ? that.setData({
                            mask_class: 'alpha0_100',
                            div_hh_success: true
                          })
                          : uni.showToast({
                            title: t.msg,
                            icon: 'none',
                            mask: true
                          });
                    }
                  }))
              : uni.showToast({
                title: '请输入正确的【' + s + '】',
                icon: 'none',
                mask: true
              });
    },

    hhurlFn: function () {
      uni.navigateTo({
        url: '/myPages/hh/hh'
      });
    },

    mask_closeFn: function (a) {
      var that = this;
      var i = a.currentTarget.dataset.maskid;
      if ('back' == a.currentTarget.dataset.closekind) {
        this.setData(t({}, i, false));
        1 == this.pages.length
            ? uni.exitMiniProgram({
              success: function (t) {
              }
            })
            : uni.navigateBack();
      }
      this.setData({
        mask_class: 'alpha100_0'
      });
      setTimeout(function () {
        var a;
        that.setData((t((a = {}), i, false), t(a, 'mask_class', 'alpha0_100'), a));
      }, 400);
    },

    xqkFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (a) {
        a
            ? uni.navigateTo({
              url: '/myPages/xqk/xqk?uid=' + that.uid
            })
            : uni.navigateTo({
              url: 'pages/login/login'
            });
      });
    },

    giftFn: function () {
      var that = this;
      this.singlePage
          ? uni.showModal({
            content: '请点击右下角《前往小程序》',
            confirmText: '朕知道了',
            showCancel: false,
            success: function (t) {
            }
          })
          : (a.empty(that.GIFT.MB) || app.globalData.openSetting(that.GIFT.MB),
              app.globalData.chklogin().then(function (a) {
                a
                    ? that.setData({
                      div_gift_btm: true,
                      div_gift_btm_box_class: 'div_upAnm1'
                    })
                    : uni.navigateTo({
                      url: '/pages/login/login'
                    });
              }));
    },

    div_gift_btm_closeFn: function () {
      var that = this;
      this.setData({
        mask_class: 'alpha100_0',
        div_gift_btm_box_class: 'div_upAnm2'
      });
      setTimeout(function () {
        that.setData({
          div_gift_btm: false,
          mask_class: 'alpha0_100',
          div_gift_btm_box_class: 'div_upAnm1'
        });
      }, 500);
    },

    gifrandFn: function () {
      var that = this;
      app.globalData.ajax({
        url: 'u.php',
        data: {
          submitok: 'ajax_gift_rand',
          uid: that.uid,
          openid: i.openid
        },
        success: function (n) {
          if (1 == n.flag) {
            that.setData(t({}, 'GIFT.LIST', n.giflist));
          } else {
            n.msg;
            n.this = that;
            a.sorry(n);
          }
        }
      });
    },

    giftmoreFn: function () {
      uni.navigateTo({
        url: '/pagesA/u/giftmore?uid=' + this.uid
      });
    },

    giftwinFn: function (t) {
      var a = t.currentTarget.dataset.id;
      this.setData({
        div_gift_win: true,
        GIFTONE: (function (t, a) {
          for (var n = a.length, i = 0; i < n; i++) {
            if (a[i].id == t) {
              return a[i];
            }
          }
        })(a, this.GIFT.LIST)
      });
    },

    gift_sendFn: function () {
      var that = this;
      uni.showLoading({
        title: '正在发送',
        mask: true
      });
      app.globalData.ajax({
        url: 'u.php',
        data: {
          submitok: 'ajax_gift_send',
          uid: that.uid,
          openid: i.openid,
          gid: that.GIFTONE.id
        },
        success: function (n) {
          uni.hideLoading();
          if (1 == n.flag) {
            that.setData({
              div_gift_win: false,
              tips0_100_0: true
            });
            that.div_gift_btm_closeFn();
            setTimeout(function () {
              that.setData({
                tips0_100_0: false
              });
            }, 3100);
          } else {
            n.msg;
            n.this = that;
            a.sorry(n);
          }
        }
      });
    },

    lawFn: function (t) {
      var a = t.currentTarget.dataset.kind;
      uni.navigateTo({
        url: '/pagesA/about/law?kind=' + a
      });
    },

    emptyFn: function () {
    },

    ifagreeFn: function (t) {
      1 == t.detail.value
          ? this.setData({
            ifagree: true
          })
          : this.setData({
            ifagree: false
          });
    },

    ifagree_passFn: function () {
      uni.showToast({
        title: '请先点击同意《用户协议》和《隐私条款》',
        icon: 'none',
        mask: true,
        duration: 3000
      });
    },

    privacy_agree: function (t) {
    },

    privacy_disagree: function (t) {
      uni.exitMiniProgram();
    },

    jubaoFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (a) {
        a
            ? uni.navigateTo({
              url: '/pagesA/u/315?uid=' + that.uid
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    laheiFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (o) {
        o
            ? app.globalData.ajax({
              url: 'u.php',
              data: {
                submitok: 'ajax_hmd',
                uid: that.uid,
                openid: i.openid
              },
              success: function (n) {
                1 == n.flag
                    ? (that.setData(t({}, 'U.ifhmd', n.ifhmd)),
                        uni.showToast({
                          title: n.msg,
                          icon: 'none',
                          mask: true
                        }))
                    : ((n.this = that), (n.url = 'no'), a.sorry(n));
              }
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    bind_dl() {
      console.log('占位：函数 bind_dl 未声明');
    }
  }
};
</script>
<style>
@import 'u.css';
</style>
